﻿using MESTranslateToPLC.Manager;
using MESTranslateToPLC.Service;
using MESTranslateToPLC.Service.BackgroudService;

namespace MESTranslateToPLC.Core.InitConfig;

public static class ServiceConfig
{
    public static IServiceCollection ServiceConfiguration(this IServiceCollection service)
    {
        service.AddSingleton<ModbusDeviceManager>();
        // service.AddHostedService<MonitorConnectService>();
        // service.AddHostedService<ReadDataTimerService>();
        service.AddHostedService<InitModbusDeviceManager>();
        return service;
    }
}